<?php
require_once("./includes/config.inc.php");

$sqlPL = " select *, S.name as name, E.name as examName, E.id as examId from tbl_subjects as S left join tbl_exam as E 
		   on S.id = E.subjectId
		   where S.courseId = '$_SESSION[sessCourseId]' and E.date = curdate() "; // where subjectId = '$subjectId' 
$sqlPL.=" order by S.id desc ";

$resS = executeQuery($sqlPL);

?>